Skip to content

Document HtmlSanitizer default action configuration #21226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

OskarStark
Copy link
Contributor

Summary

This PR adds documentation for the HtmlSanitizer default action configuration feature introduced in Symfony 7.2. The feature allows developers to configure how unconfigured HTML elements are handled by the sanitizer.

Changes Made

  • Added new section "Default Action for Unconfigured Elements" in the HtmlSanitizer documentation
  • Documented the defaultAction() method and HtmlSanitizerAction enum
  • Included configuration examples for YAML, XML, PHP, and standalone PHP usage
  • Added version note indicating the feature was introduced in Symfony 7.2
  • Explained the three possible actions: Drop, Block, and Allow

Test plan

  • Added comprehensive documentation with examples
  • Included proper version annotation
  • Followed existing documentation structure and formatting
  • Added appropriate cross-references and notes

Fixes #20004

🤖 Generated with Claude Code

Add documentation for the default action feature introduced in Symfony 7.2
that allows configuring how unconfigured HTML elements are handled.

Fixes #20004

🤖 Generated with [Claude Code](https://claude.ai/code)
@OskarStark OskarStark closed this Jul 21, 2025
@OskarStark OskarStark deleted the document-htmlsanitizer-default-action branch July 21, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HtmlSanitizer] Add support for configuring the default action
2 participants